<template>
  <div class="order">
  <div style="margin-left: 10%;margin-right:10% ;">
  <table style="margin-top:30px">
      <tr>
          <th style="width:180px">图片</th>
          <th style="width:400px">名称</th>
          <th style="width:100px">卖家</th>
          <th style="width:100px">单价</th>      
          <th style="width:100px">状态</th>      
      </tr>
      <tr v-for="value in order">
          <td><img :src=value.products.imgPath style="width:100px"></td>
          <td>{{value.products.title}}</td>
          <td>{{value.products.owner}}</td>
          <td>{{value.products.price}}</td>
          <td>{{value.state?'已支付':'待支付'}}</td>
      </tr>
  </table>
  </div>
  </div>
  </template>
<script>
  export default {
      name: 'OrderView',
      data(){
      return{
          order:[]
      }
  },
  created(){
      this.axios.get('api/Getorder').then(res => {      
          this.order = res.data.data
          console.log(this.order);
      })
  }
  };
</script>
<style>
.order{
    background-color: #fff;
}
</style>